<template>
	<view class="detail card">
		<view class="flex flex-col justify-between flex-1 h-full">
			<view class="record-content">
				<view class="record-item" v-show="taskInfo?.assetCode">
					<text>设备编码</text>
					<text>{{ taskInfo?.assetCode || '' }}</text>
				</view>
				<view class="record-item" v-show="taskInfo?.sopStandardName">
					<text>点检标准</text>
					<text>{{ taskInfo?.sopStandardName || '' }}</text>
				</view>
				<view class="record-item" v-show="taskInfo?.planTime">
					<text>计划时间</text>
					<text>{{ taskInfo?.planTime || '' }}</text>
				</view>
				<view class="record-item" v-show="taskInfo?.orderStatus == 2 && taskInfo?.workTime">
					<text>完成时间</text>
					<text>{{ taskInfo?.workTime || '' }}</text>
				</view>
				<view class="record-item" v-show="taskInfo?.orderStatus == 2">
					<text>点检结果</text>
					<text :class="taskInfo?.checkResult == 0?'red':''">{{ taskInfo?.checkResult == 0? '不合格': taskInfo?.checkResult == 1?'合格':'无' }}</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup name="ConsumablesDetachInfo">
const props = defineProps({
	taskInfo: {
		type: Object,
		default: () => {}
	}
});

const { taskInfo } = toRefs(props);

// 是否折叠
const isCollapse = ref(false);
</script>

<style lang="scss" scoped>
// .card {
// 	background-color: #fff;
// 	margin: 10px 10px;
// 	border-radius: 8px;
// 	padding: 12px 12px;
// 	transition: all 300ms ease;
// 	box-shadow: 0 2px 6px rgba(3, 121, 255, 0.05);
// }
.record-content .record-item > :first-child {
	min-width: 76px;
}
</style>
